package inherited;

public class Stationary {
	protected String type = "Stationary";
	protected int duralility = 0;
	
	public Stationary() {
	}
	
	public void getType(){
		System.out.println("This is a "+type);
	}
	
	public void getDuralility() {
		System.out.println("It can be used for "+duralility+" time");
	}
	
	public void use(){
		if(!(duralility <= 0)){
			duralility--;
			System.out.println("Successfully used "+type+", can be "+duralility+" times");
		}
	}
}
